package com.ruoyi.coal.modules.coalpile.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.sql.Time;

@TableName("cp_timing")
public class TimingEntity implements Serializable {
  private static final long serialVersionUID = 1L;

  @TableId
  @ApiModelProperty("定时id")
  private Integer id;

  @ApiModelProperty("煤场id")
  private Integer coalYardId;

  @ApiModelProperty("定时时间")
  private Time time;

  @ApiModelProperty("开关(0:关闭 1:开始)")
  private Integer timeSwitch;

  @ApiModelProperty("备注")
  private String remarks;

  @ApiModelProperty("cron表达式")
  private String cronExpression;

  @TableLogic(value = "1", delval = "0")
  @TableField(fill = FieldFill.INSERT)
  @ApiModelProperty(value = "逻辑删除(0:删除 1:保存)", hidden = true)
  private Integer del;

  public void setId(Integer id) {
    this.id = id;
  }

  public void setCoalYardId(Integer coalYardId) {
    this.coalYardId = coalYardId;
  }

  public void setTime(Time time) {
    this.time = time;
  }

  public void setTimeSwitch(Integer timeSwitch) {
    this.timeSwitch = timeSwitch;
  }

  public void setRemarks(String remarks) {
    this.remarks = remarks;
  }

  public void setCronExpression(String cronExpression) {
    this.cronExpression = cronExpression;
  }

  public void setDel(Integer del) {
    this.del = del;
  }

  public boolean equals(Object o) {
    if (o == this)
      return true;
    if (!(o instanceof com.ruoyi.coal.modules.coalpile.domain.TimingEntity))
      return false;
    com.ruoyi.coal.modules.coalpile.domain.TimingEntity other = (com.ruoyi.coal.modules.coalpile.domain.TimingEntity)o;
    if (!other.canEqual(this))
      return false;
    Object this$id = getId(), other$id = other.getId();
    if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id))
      return false;
    Object this$coalYardId = getCoalYardId(), other$coalYardId = other.getCoalYardId();
    if ((this$coalYardId == null) ? (other$coalYardId != null) : !this$coalYardId.equals(other$coalYardId))
      return false;
    Object this$time = getTime(), other$time = other.getTime();
    if ((this$time == null) ? (other$time != null) : !this$time.equals(other$time))
      return false;
    Object this$timeSwitch = getTimeSwitch(), other$timeSwitch = other.getTimeSwitch();
    if ((this$timeSwitch == null) ? (other$timeSwitch != null) : !this$timeSwitch.equals(other$timeSwitch))
      return false;
    Object this$remarks = getRemarks(), other$remarks = other.getRemarks();
    if ((this$remarks == null) ? (other$remarks != null) : !this$remarks.equals(other$remarks))
      return false;
    Object this$cronExpression = getCronExpression(), other$cronExpression = other.getCronExpression();
    if ((this$cronExpression == null) ? (other$cronExpression != null) : !this$cronExpression.equals(other$cronExpression))
      return false;
    Object this$del = getDel(), other$del = other.getDel();
    return !((this$del == null) ? (other$del != null) : !this$del.equals(other$del));
  }

  protected boolean canEqual(Object other) {
    return other instanceof com.ruoyi.coal.modules.coalpile.domain.TimingEntity;
  }

  public int hashCode() {
    int PRIME = 59;
    int result = 1;
    Object $id = getId();
    result = result * 59 + (($id == null) ? 43 : $id.hashCode());
    Object $coalYardId = getCoalYardId();
    result = result * 59 + (($coalYardId == null) ? 43 : $coalYardId.hashCode());
    Object $time = getTime();
    result = result * 59 + (($time == null) ? 43 : $time.hashCode());
    Object $timeSwitch = getTimeSwitch();
    result = result * 59 + (($timeSwitch == null) ? 43 : $timeSwitch.hashCode());
    Object $remarks = getRemarks();
    result = result * 59 + (($remarks == null) ? 43 : $remarks.hashCode());
    Object $cronExpression = getCronExpression();
    result = result * 59 + (($cronExpression == null) ? 43 : $cronExpression.hashCode());
    Object $del = getDel();
    return result * 59 + (($del == null) ? 43 : $del.hashCode());
  }

  public String toString() {
    return "TimingEntity(id=" + getId() + ", coalYardId=" + getCoalYardId() + ", time=" + getTime() + ", timeSwitch=" + getTimeSwitch() + ", remarks=" + getRemarks() + ", cronExpression=" + getCronExpression() + ", del=" + getDel() + ")";
  }

  public Integer getId() {
    return this.id;
  }

  public Integer getCoalYardId() {
    return this.coalYardId;
  }

  public Time getTime() {
    return this.time;
  }

  public Integer getTimeSwitch() {
    return this.timeSwitch;
  }

  public String getRemarks() {
    return this.remarks;
  }

  public String getCronExpression() {
    return this.cronExpression;
  }

  public Integer getDel() {
    return this.del;
  }
}
